<?php

/**
 * CoffeeShopExportSearchForm class.
 * CoffeeShopExportSearchForm is the data structure for keeping
 * filter data used to search coffee shop information. It is used by the 'exportFile' action of 'CoffeeShopController'.
 */
class CoffeeShopExportSearchForm extends CFormModel
{
	public $coffeeShopName;
	public $claimed;
	public $ownerName;
	public $ownerEmail;
	public $subscribed;
	public $paymentDateStart;
	public $paymentDateEnd;
	public $votePeriod;
	public $suburb;
	public $state;

	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			// claimed and subscribed should be 1 or 0 for yes or no.
			array('claimed, subscribed,paymentDateStart, paymentDateEnd','numerical', 'integerOnly'=>true),
			array('coffeeShopName, ownerName, ownerEmail, votePeriod, suburb, state','safe'),
		);
	}

	/**
	 * Declares customized attribute labels.
	 * If not declared here, an attribute would have a label that is
	 * the same as its name with the first letter in upper case.
	 */
	public function attributeLabels()
	{
		return array(
			'coffeeShopName'=>'Coffee Shop',
			'claimed'=>'Claimed',
			'ownerName'=>'Owner Name',
			'ownerEmail'=>'Owner Email',
			'subscribed'=>'Subscribed',
			'paymentDateStart'=>'Paid',
			'votePeriod'=>'Vote Period',
			'suburb'=>'Suburb',
			'state'=>'State',
		);
	}
}